package com.dwj.auto.comment.common.enums;

import java.util.Random;

/**
 * @ClassName ConjunctionEnum
 * @Description
 * @Author dwjian
 * @Date 2020/7/19 16:28
 */
public enum  ConjunctionEnum {

    AND("同时,并且,而且"),
    BUT("但是,可是,然而,但");

    private String value;

    ConjunctionEnum(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static String random(ConjunctionEnum conjunctionEnum){
        String[] conjunctions = conjunctionEnum.value.split(",");
        return conjunctions[new Random().nextInt(conjunctions.length)];
    }
}
